(function() {
    lub = {
        toast: function(msg) {
        	if(!msg){
        		msg='已完成';
        	}
            var html = '<div id="toast" style="display: none;">';
            html +=     '<div class="weui-mask_transparent"></div>';
            html += 	'<div class="weui-toast">';
            html += 		'<i class="weui-icon-success-no-circle weui-icon_toast"></i>';
            html += 		'<p class="weui-toast__content">' + msg + '</p>';
            html += 	'</div>'; 
            html+=	'</div>';
            $('body').append(html);
            var $toast = $('#toast');
            if ($toast.css('display') != 'none') return;
            $toast.fadeIn(100);
        },
        hideToast:function(){
            var $toast = $('#toast');
        	$toast.fadeOut(100);
        },
        progress:function(msg){
        	if(!msg){
        		msg='努力处理中...';
        	}
        	var html=	'<div id="loadingToast" style="display:none;">';
        		html+=		'<div class="weui-mask_transparent"></div>';
        		html+=		'<div class="weui-toast">';
		        html+=    		'<i class="weui-loading weui-icon_toast"></i>';
		        html+=    		'<p class="weui-toast__content">'+msg+'</p>';
		        html+=		'</div>';
		    	html+=	'</div>';
            $('body').append(html);
        	var $loadingToast = $('#loadingToast');
            if ($loadingToast.css('display') != 'none') return;
            $loadingToast.fadeIn(100);
        },
        hideProgress:function(){
        	var $loadingToast = $('#loadingToast');
            $loadingToast.fadeOut(100);
        }
    }
})();
